import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''
//根据Id查询
export function queryJobByJobIdServe(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.queryJobByJobId,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
}

//获取编码
export function getSqsxBm(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.getSqsxBm,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }
  export function spcyGetJobConcernByJobId(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcyGetJobConcernByJobId,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }
  export function spcydelRwdjJob(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcydelRwdjJob,
      method:'delete' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }

  export function spcyqueryWjzgMlByQy(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcyqueryWjzgMlByQy,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }
  
  export function spcyqueryWjMlByQy(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcyqueryWjMlByQy,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }
  export function mydquerySqsxLjzlMydObject(params){
    return axios({
      url: assessCheckApi.mydquerySqsxLjzlMydObject,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }
  
  export function dictgetDictListByDictName(params){
    return axios({
      url: assessCheckApi.dictgetDictListByDictName,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }
  
  export function mydeditLjzlMyd(params){
    return axios({
      url: assessCheckApi.mydeditLjzlMyd,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }
  export function mydupdateZxPjById(params){
    return axios({
      url: assessCheckApi.mydupdateZxPjById,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }
  export function mydupdateHcyPj(params){
    return axios({
      url: assessCheckApi.mydupdateHcyPj,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }

  export function mydTjLjzlMydWj(params){
    return axios({
      url: assessCheckApi.mydTjLjzlMydWj,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }

  export function myddownMydTemplatepPdfFile(params){
    return axios({
      url: assessCheckApi.myddownMydTemplatepPdfFile,
      method:'get' ,
      params:params,
      url_1:'outside',
      responseType: 'arraybuffer'
    })
  }
  export function spcyzwfwsubmitFlowByQy(params){
    return axios({
      url: assessCheckApi.spcyzwfwsubmitFlowByQy,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }
  
  
